package com.wc.算法基础课.E第五讲动态规划.数位统计DP.计数问题;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/1/17 17:27
 * @description https://www.acwing.com/problem/content/340/
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int a, b;

    public static void main(String[] args) {
        while (sc.hasNext()) {
            a = sc.nextInt();
            b = sc.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            if (a > b) {
                int tmp = a;
                a = b;
                b = tmp;
            }
            for (int i = 0; i < 10; i++) {
                out.print(count(b, i) - count(a - 1, i));
                out.print(' ');
            }
            out.println();
        }
        out.flush();
    }

    static int power10(int x) {
        int res = 1;
        while (x-- > 0) {
            res *= 10;
        }
        return res;
    }

    static int count(int n, int x) {
        int res = 0;
        int l, r, m = n, cnt = 0;
        while (m > 0) {
            cnt++;
            m /= 10;
        }
        for (int i = 0; i < cnt; i++) {
            r = power10(i);
            l = n / r / 10;
            res += l * r;
            if (x == 0) {
                res -= r;
            }
            int d = n / r % 10;
            if (d == x) {
                res += n % r + 1;
            }
            if (d > x){
                res += r;
            }
        }

        return res;
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
